﻿<UserControl x:Class="Supremacy.Client.Views.ColonyInfoView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:s="http://schemas.startreksupremacy.com/xaml/core"
             xmlns:scc="http://schemas.startreksupremacy.com/xaml/presentation">
  
  <scc:AutoGrid Orientation="Vertical">
    
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto" />
      <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    
    <!-- SYSTEM INFO HEADER -->
    <TextBlock Grid.ColumnSpan="2"
               FontSize="18pt"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource PRODUCTION}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    
    <!-- MORALE -->
    <TextBlock Margin="14,0,0,0"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource MORALE}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    <TextBlock HorizontalAlignment="Right"
               Foreground="{Binding Path=SelectedColony.Morale.CurrentValue, Mode=OneWay, Converter={StaticResource MoraleBrushConverter}}"
               Text="{Binding Path=SelectedColony.Morale.CurrentValue, Mode=OneWay, Converter={StaticResource MoraleConverter}, ConverterParameter=UpperCase}" />
    
    <!-- FOOD -->
    <TextBlock Margin="14,0,0,0"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource FOOD_SURPLUS}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    <TextBlock Foreground="{StaticResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}"
               HorizontalAlignment="Right">
      <scc:TextBlockExtensions.FormattedText>
        <MultiBinding StringFormat="{}{0} ([f {1}]{2}[/])">
          <Binding Path="SelectedColony.FoodReserves.CurrentValue"
                   Mode="OneWay" />
          <Binding Path="SelectedColony.NetFood"
                   Mode="OneWay"
                   Converter="{StaticResource NetValueBrushConverter}"
                   ConverterParameter="{StaticResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}" />
          <Binding Path="SelectedColony.NetFood"
                   Mode="OneWay"
                   Converter="{StaticResource NetValueConverter}" />
        </MultiBinding>
      </scc:TextBlockExtensions.FormattedText>
    </TextBlock>

    <!-- INDUSTRY -->
    <TextBlock Margin="14,0,0,0"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource INDUSTRY}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    <TextBlock HorizontalAlignment="Right"
               Foreground="{StaticResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}"
               Text="{Binding Path=SelectedColony.NetIndustry, Mode=OneWay}" />
    
    <!-- NET ENERGY -->
    <TextBlock Margin="14,0,0,0"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource ENERGY}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    <TextBlock HorizontalAlignment="Right"
               Foreground="{Binding Path=SelectedColony.NetEnergy, Mode=OneWay, Converter={StaticResource NetValueBrushConverter}, ConverterParameter={StaticResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}}"
               Text="{Binding Path=SelectedColony.NetEnergy, Mode=OneWay}" />
    
    <!-- RESEARCH -->
    <TextBlock Margin="14,0,0,0"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource RESEARCH}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    <TextBlock HorizontalAlignment="Right"
               Foreground="{StaticResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}"
               Text="{Binding Path=SelectedColony.NetResearch, Mode=OneWay}" />

    <!-- INTELLIGENCE -->
    <TextBlock Margin="14,0,0,0"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource INTELLIGENCE}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    <TextBlock HorizontalAlignment="Right"
               Foreground="{StaticResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}"
               Text="{Binding Path=SelectedColony.NetIntelligence, Mode=OneWay}" />


    <!-- RESOURCES HEADER -->
    <TextBlock Grid.ColumnSpan="2"
               FontSize="18pt"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource RESOURCES}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />

    <!-- DILITHIUM -->
    <TextBlock Margin="14,0,0,0"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource DILITHIUM}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    <TextBlock HorizontalAlignment="Right"
               Foreground="{StaticResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}"
               Text="{Binding Path=SelectedColony.NetDilithium, Mode=OneWay}" />
    
    <!-- DEUTERIUM -->
    <TextBlock Margin="14,0,0,0"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource DEUTERIUM}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    <TextBlock HorizontalAlignment="Right"
               Foreground="{StaticResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}"
               Text="{Binding Path=SelectedColony.NetDeuterium, Mode=OneWay}" />
    
    <!-- RAW MATERIALS -->
    <TextBlock Margin="14,0,0,0"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource RAW_MATERIALS}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    <TextBlock HorizontalAlignment="Right"
               Foreground="{StaticResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}"
               Text="{Binding Path=SelectedColony.NetRawMaterials, Mode=OneWay}" />

    <!-- PERSONNEL -->
<!--
    <TextBlock Margin="14,0,0,0"
               Foreground="{StaticResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}"
               Text="{Binding Source={s:StringResource PERSONNEL}, Mode=OneTime, Converter={StaticResource UpperCaseConverter}}" />
    <TextBlock HorizontalAlignment="Right"
               Foreground="{StaticResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}"
               Text="{Binding Path=SelectedColony.NetPersonnel, Mode=OneWay}" />
-->
    
  </scc:AutoGrid>
</UserControl>
